package com.lee.forum.config;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lishuo
 * Date: 2024-01-30
 * Time: 0:59
 */

import com.lee.forum.services.IArticleReplyService;
import com.lee.forum.services.IArticleService;
import com.lee.forum.services.IArticleTopCacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * 进行缓存预热的类（热榜Top10）
 */
@Slf4j
@Component
public class CachePreloader {

    @Autowired
    private IArticleTopCacheService articleTopCacheService;

    @Autowired
    private IArticleService articleService;

    @Autowired
    private IArticleReplyService replyService;

    @PostConstruct
    public void preloadCache() {
        // 缓存预热
        // articleTopCacheService.preloadCache();
        log.info("缓存预热暂时注释!");
    }

}
